<div class="container" style="margin-top: 40px;">
    <ul class="nav nav-tabs midbox" id="myTab">
        <?php $this->component('Hr_StaffMenu','work');?>
    </ul>
    <form class="form-inline">
        <div class="midbox" style="margin-top:20px;">
            <?php $this->component('Hr_SelectDePartMent','no_company');?>
            <select class="span1" style="width:85px; margin:0 -4px 0 12px;" name="search_type" id="search_type">
                <option value="1" <?php if($params['search_type']==1):?>selected="selected"<?php endif;?>>姓名</option>
                <option value="2" <?php if($params['search_type']==2):?>selected="selected"<?php endif;?>>工号</option>
                <option value="3" <?php if($params['search_type']==3):?>selected="selected"<?php endif;?>>职位</option>
            </select>
            <input type="text" name="kw" placeholder="请输入..." style="width:100px;" value="<?=$params['kw']?>" />
            <button type="submit" class="btn btn-small">搜索</button>
            <div class="btn-group" style="float: right;">
                <!--<button class="btn btn-small disabled" disabled>共有<?=$data['user_count']?>名在职员工</button>-->
                <span class="btn btn-small disabled" style="cursor:default;">共有<?=$data['user_count']?>名在职员工</span>
            </div>
        </div>
    </form>

    <form id="form-content" method="post">
    <table class="midbox table" style="margin-top: 20px;">
        <thead>
        <tr>
            <th>工号</th>
            <th>姓名</th>
            <th>职位</th>
            <th>职能</th>
            <th>事业部</th>
            <th>城市</th>
            <th>操作项</th>
        </tr>
        </thead>
        <?php if($data['user_list']):?>
        <tbody>
        <?php foreach($data['user_list'] as $val):?>
        <?php
        $dep_id=$val['dep_info']['department_id'];
        $function_id=$val['dep_info']['function_id'];
        $bu_id=$val['dep_info']['bu_id'];
        ?>
        <tr>
            <td><label class="checkbox" style="padding-left:0;">&nbsp;&nbsp;
            <?php if($data['is_sh_hr']):?>
            <input type="checkbox" name="user_ids[]" value="<?=$val['user_id']?>">
            <?php endif;?>
            <?=$val['user_code']?></label></td>
            <td><?=$val['user_name']?></td>
            <td><?=$val['job_info']['position_name']?></td>
            <td><?=$selectdata['function'][$function_id]['function_name']?></td>
            <td><?=$selectdata['business'][$bu_id]['bu_name']?></td>
            <td><?=$selectdata['citylist'][$val['work_city_id']]?></td>
            <td><a href="<?=Util_BaseUrls::staff_add_url($val['user_id'])?>" target="_blank">编辑</a>&nbsp;
            <?php if($data['is_sh_hr']):?>
            <a href="<?=Util_BaseUrls::staff_transfer_url($val['user_id'])?>" target="_blank">转岗</a>&nbsp;
            <a href="<?=Util_BaseUrls::staff_dimission_url($val['user_id'])?>" target="_blank">离职</a>
            <?php endif;?>
            </td>
        </tr>
        <?php endforeach;?>
        </tbody>
        <?php endif;?>
    </table>

    <div class="midbox div_bottom">
        <div class="dL">
            <div class="d1">
                <label class="radio inline">
                    <input type="radio" class="inline" name="optionsRadios" id="optionsRadios1" value="1" checked="" />更改职位
                </label>
                <label class="radio inline">
                    <input type="radio" class="inline" name="optionsRadios" id="optionsRadios2" value="2" />更改直属上级
                </label>
            </div>
            <div class="d2">
                <input type="text" class="search_name span2" style="margin: 0 auto;" />
                <input type="hidden" name="user_id"/>
                <input type="hidden" name="job_id"/>
                <input type="submit" value="确定" class="btn" />
            </div>
        </div>

        <div class="dR">
            <div class="pagination pagination-right">
                <?php if(isset($data['multipage']) && !empty($data['multipage']['list'])) {?>
                <?php $this->component('Hr_MultiPage', array('multipage'=>$data['multipage'])); ?>
                <?php } ?>
            </div>
        </div>
        <div style="clear: both;"></div>
    </div>
    </form>


</div>


<?php $this->script_block_begin();?>
<script language="javascript" type="text/javascript">
    var ajaxUrl = '<?=Util_BaseUrls::ajax_search_user()?>';
    var ajaxUrl2 = '<?=Util_BaseUrls::ajax_search_job()?>';

$('#myTab a:first').tab('show');
//$('.typeahead').typeahead();
</script>
<?php $this->script_block_end();?>